gint border_width;
gint expander_size;
gint expander_spacing;
- gboolean interior_focus;
gint focus_width;
gint focus_pad;
gboolean ltr;
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
gtk_widget_style_get (widget,
- "interior-focus", &interior_focus,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
"expander-size", &expander_size,
rect->y += expander_spacing;
}
- if (!interior_focus)
- {
- if (ltr)
- rect->x += focus_width + focus_pad;
- else
- rect->x -= focus_width + focus_pad;
- rect->y += focus_width + focus_pad;
- }
-
rect->width = rect->height = expander_size;
}
guint border_width;
gint expander_size;
gint expander_spacing;
- gboolean interior_focus;
gint focus_width;
gint focus_pad;
gint label_height, top_min_height;
gtk_widget_set_allocation (widget, allocation);
gtk_widget_style_get (widget,
- "interior-focus", &interior_focus,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
"expander-size", &expander_size,
label_xoffset = border_width + expander_size + focus_width + 2 * expander_spacing + focus_pad;
label_xpad = 2 * border_width + expander_size + 2 * focus_width + 2 * expander_spacing + 2 * focus_pad;
- child_yoffset = border_width + priv->spacing + (interior_focus ? 0 : 2 * focus_width + 2 * focus_pad);
- child_ypad = 2 * border_width + priv->spacing + (interior_focus ? 0 : 2 * focus_width + 2 * focus_pad);
+ child_yoffset = border_width + priv->spacing;
+ child_ypad = 2 * border_width + priv->spacing;
top_min_height = 2 * expander_spacing + expander_size;
child_visible = (child && gtk_widget_get_child_visible (child));
gint top_height;
top_height = MAX (top_min_height,
- label_height + (interior_focus ? 2 * focus_width + 2 * focus_pad : 0));
+ label_height + (2 * focus_width + 2 * focus_pad));
child_allocation.x = allocation->x + border_width;
child_allocation.y = allocation->y + top_height + child_yoffset;
GtkExpanderPrivate *priv;
GdkRectangle area;
GtkStyleContext *context;
- gboolean interior_focus;
int focus_width;
int focus_pad;
int expander_size;
container = GTK_CONTAINER (expander);
gtk_widget_style_get (widget,
- "interior-focus", &interior_focus,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
"expander-size", &expander_size,
else
area.height = 0;
- area.height += interior_focus ? (focus_width + focus_pad) * 2 : 0;
+ area.height += (focus_width + focus_pad) * 2;
area.height = MAX (area.height, expander_size + 2 * expander_spacing);
- area.height += !interior_focus ? (focus_width + focus_pad) * 2 : 0;
context = gtk_widget_get_style_context (widget);
gtk_render_background (context, cr,
GdkRectangle rect;
GtkStyleContext *context;
gint x, y, width, height;
- gboolean interior_focus;
gint border_width;
gint focus_width;
gint focus_pad;
gtk_widget_get_allocation (widget, &allocation);
gtk_widget_style_get (widget,
- "interior-focus", &interior_focus,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
"expander-size", &expander_size,
if (ltr)
{
- if (interior_focus)
- x += expander_spacing * 2 + expander_size;
+ x += expander_spacing * 2 + expander_size;
}
else
{
x += allocation.width - 2 * border_width
- expander_spacing * 2 - expander_size - width;
}
-
- if (!interior_focus)
- {
- width += expander_size + 2 * expander_spacing;
- height = MAX (height, expander_size + 2 * expander_spacing);
- }
}
else
{
gint border_width;
gint expander_size;
gint expander_spacing;
- gboolean interior_focus;
gint focus_width;
gint focus_pad;
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
gtk_widget_style_get (GTK_WIDGET (widget),
- "interior-focus", &interior_focus,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
"expander-size", &expander_size,
gint border_width;
gint expander_size;
gint expander_spacing;
- gboolean interior_focus;
gint focus_width;
gint focus_pad;
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
gtk_widget_style_get (GTK_WIDGET (widget),
- "interior-focus", &interior_focus,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
"expander-size", &expander_size,
"expander-spacing", &expander_spacing,
NULL);
- *minimum_size = *natural_size =
- interior_focus ? (2 * focus_width + 2 * focus_pad) : 0;
-
+ *minimum_size = *natural_size = 2 * focus_width + 2 * focus_pad;
if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
{
*minimum_size = MAX (*minimum_size, expander_size + 2 * expander_spacing);
*natural_size = MAX (*natural_size, *minimum_size);
- if (!interior_focus)
- {
- gint extra = 2 * focus_width + 2 * focus_pad;
- *minimum_size += extra;
- *natural_size += extra;
- }
-
if (child && gtk_widget_get_child_visible (child))
{
gint child_min, child_nat;
gint border_width;
gint expander_size;
gint expander_spacing;
- gboolean interior_focus;
gint focus_width;
gint focus_pad;
gint label_xpad;
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
gtk_widget_style_get (GTK_WIDGET (widget),
- "interior-focus", &interior_focus,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
"expander-size", &expander_size,
label_xpad = 2 * border_width + expander_size + 2 * expander_spacing - 2 * focus_width + 2 * focus_pad;
- *minimum_height = *natural_height =
- interior_focus ? (2 * focus_width + 2 * focus_pad) : 0;
+ *minimum_height = *natural_height = 2 * focus_width + 2 * focus_pad;
if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
*minimum_height = MAX (*minimum_height, expander_size + 2 * expander_spacing);
*natural_height = MAX (*natural_height, *minimum_height);
- if (!interior_focus)
- {
- gint extra = 2 * focus_width + 2 * focus_pad;
- *minimum_height += extra;
- *natural_height += extra;
- }
-
if (child && gtk_widget_get_child_visible (child))
{
gint child_min, child_nat;